package svc

import (
	"exam/api/internal/config"
	"exam/examrpc/examrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	Examrpc examrpcclient.Examrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		Examrpc: examrpcclient.NewExamrpc(zrpc.MustNewClient(c.Examrpc)),
	}
}
